import axios from "../../axios/index"
function getlist(query){
    return axios.get("/list",{params:query})
}
function pushlist(body){
    console.log(body);
    return axios.post("/list",body)
}
function deillist(body){
    return axios.put("/list",body)
}
function dellist(id){
    return axios.delete(`/list/${id}`)
}

//注册
function userlist(body){
    return axios.post("/ulist",body)
}
//登录
function login(body){
    return axios.post(`/login`,body)
}

//商品接口
function shoplist(query){
    return axios.get("/shops",{params:query})
}
//详情接口
function shopDeil(id){
    return axios.get(`/shopsdeils/${id}`)
}

//加入购物车接口
function shopaddlist(body){
    return axios.post("/shopaddlist",body)
}
export default{
    getlist,
    pushlist,
    deillist,
    dellist,
    userlist,
    login,
    shoplist,
    shopDeil,
    shopaddlist
}